﻿//-----------------------------------------------------------------------
// <copyright file="ServerSettingsData.cs" company="AFS">
// Copyright (c) AFS. All rights reserved.
//
//    This file is part of Chatbox.
//
//    Chatbox is free software: you can redistribute it and/or modify
//    it under the terms of the GNU Lesser General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    any later version.
//
//    Chatbox is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//    GNU Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public License
//    along with Chatbox. If not, see http://www.gnu.org/copyleft/lesser.html
// </copyright>
//----------------------------------------------------------------------- 

namespace ChatBox.DomainObjects.Settings
{
    /// <summary>
    ///  settings data about the server
    /// </summary>
    public class ServerSettingsData
    {
        #region data 

        /// <summary>
        /// Gets or sets the server to connect to 
        /// </summary>
        public string Server { get; set; }

        /// <summary>
        /// Gets or sets the path for the services directory
        /// </summary>
        public string XmlTickersPath { get; set; }

        /// <summary>
        /// Gets or sets the interval in miliseconds at which the public chat messages should be retrieved
        /// </summary>
        public int PublicChatRefreshInterval { get; set; }

        /// <summary>
        /// Gets or sets the interval in miliseconds at which the private chat messages should be retrieved
        /// </summary>
        public int PrivateChatRefreshInterval { get; set; }

        /// <summary>
        /// Gets or sets the interval in miliseconds at which the other users should be retrieved
        /// </summary>
        public int OtherUsersRefreshInterval { get; set; }

        /// <summary>
        /// Gets or sets the interval in miliseconds at which the tickers should be retrieved
        /// </summary>
        public int TickersRefreshInterval { get; set; }

        /// <summary>
        /// Gets or sets the maximum public messages kept
        /// </summary>
        public int MaxPublicMessagesKept { get; set; }

        /// <summary>
        /// Gets or sets the user login name
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// Gets or sets the user login password
        /// </summary>
        public string Password { get; set; }
       
        /// <summary>
        /// Gets or sets the last version used to log on
        /// </summary>
        public decimal LastLogOnVersion { get; set; }

        #endregion

        #region methods

        /// <summary>
        /// Get the full URL for xml tickers
        /// </summary>
        /// <returns>The full path for xml tickers</returns>
        public string XmlTickersFullPath()
        {
            return this.Server + '/' + this.XmlTickersPath;
        }

        #endregion
    }
}
